package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: Shylo Sun
 * @Project: spzx-parent
 * @Date: 2023/11/4 15:39
 */
@Mapper
public interface SysUserMapper {

    /**
     * 根据用户名查询用户数据
     *
     * @param userName
     * @return
     */
    SysUser selectByUsername(String userName);

    /**
     * 根据用户名称查询用户数据
     *
     * @param sysUserDto
     * @return
     */
    List<SysUser> findByPage(SysUserDto sysUserDto);

    /**
     * 保存用户数据
     *
     * @param sysUser
     */
    void saveSysUser(SysUser sysUser);

    /**
     * 修改用户
     *
     * @param sysUser
     */
    void updateSysUser(SysUser sysUser);

    /**
     * 删除用户
     *
     * @param userId
     */
    void deleteById(Long userId);
}
